package ophiux.wechatpay.sdk.test.map;

import java.util.SortedMap;

import ophiux.wechatpay.sdk.OphiuxWeChatPaySDKException;
import ophiux.wechatpay.sdk.common.parse.map.MapConverter;

public class test {

	public static void main(String[] args) {
		
		ResultEntity res = new ResultEntity();
		res.setError_code("1");
		res.setREASON("2");
		SortedMap<String,Object> targetMap = null;
		try {
			targetMap = MapConverter.parseEntityToMap(res);
		} catch (OphiuxWeChatPaySDKException e) {
			e.printStackTrace();
		}
		
		/*ResponseTest<DataTest> resp = new ResponseTest<DataTest>();
		DataTest data = new DataTest();
		data.setFlag(12);
		data.setAmount(66.00f);
		
		data.setAppid("这是对象里面的");
		
		List<Item> testList = new ArrayList<Item>();
		Item item = new Item();
		item.setName("这是列表里面的值1");
		
		Item item2 = new Item();
		item2.setName("这是列表里面的值2----");
		
		testList.add(item2);
		testList.add(item);
		
		resp.setData(data);
		resp.setReason("卧槽");
		
		resp.setItemList(testList);
		
		SortedMap<String,Object> targetMap = null;
		try {
			targetMap = MapConverter.parseEntityToMap(resp);
		} catch (OphiuxWeChatPaySDKException e) {
			e.printStackTrace();
		}
		System.out.println(targetMap.toString());*/
	}
	
}
